package com.yuanfeng.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yuanfeng.business.dto.MerchantVersionDTO;
import com.yuanfeng.business.dto.ShopRecordDTO;
import com.yuanfeng.business.dto.ShopRegistrationDTO;
import com.yuanfeng.business.entity.ShopRegistrationEntity;
import com.yuanfeng.business.vo.QuUsablePrecinctVO;
import com.yuanfeng.commoms.dto.goods.ActivityNoneUpdateDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @Entity com.yuanfeng.business.entity.ShopRegistration
 */
@Mapper
public interface ShopRegistrationMapper extends BaseMapper<ShopRegistrationEntity> {

    Integer insertShopRegistration(ShopRegistrationDTO param);

    Integer updateShopRegistration(ShopRegistrationDTO param);

    IPage<ShopRegistrationDTO> selectShopRegistration(IPage<ShopRegistrationDTO> page , @Param("param") ShopRegistrationDTO param);

    List<QuUsablePrecinctVO> queryActiveName();


    Integer checkGoodsIsExist(@Param("param") Map<String, Object> param);

    void insertActivityGoods(@Param("noneGoodsList") List<ActivityNoneUpdateDTO> noneGoodsList);

    /**
     * 查询最新版本
     * @return
     */
    List<MerchantVersionDTO> selectNewVersion();

    /**
     * 查询最新报名活动
     * @return
     */
    List<ShopRegistrationDTO> selectNewShopRegist();

    /**
     * 按店铺id查询店铺信息
     * @param shopId
     * @return
     */
    List<ShopRecordDTO> selectShopXinXi(@Param("shopId") String shopId);

    /**
     * 插入活动报名店铺记录表
     * @param param
     * @return
     */
    Integer insertShopRecord(@Param("param") ShopRecordDTO param);
}




